<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="com.bio.service.right.MenuService"%>
<%@page import="com.bio.vo.right.MenuVo"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%String ctx = request.getContextPath();
  ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
  MenuService menuService = (MenuService)ac.getBean("menuService");
  Long userTypeId = Long.valueOf(String.valueOf(request.getSession().getAttribute("MEDICAL_USER_TYPE")));
  List<MenuVo> menus = menuService.findMenuVosBySuperior(6L, userTypeId);
  request.getSession().setAttribute("workflowMenus",menus);
%>

<div id="nav" class="f_l" style="width:720px">
  <ul style="list-style:none; margin:0; padding:0;">
    <c:forEach items="${workflowMenus}" var="news">
      <li class="mainlevel" id="mainlevel_01"><a href="#"><span class="padding3">${news.name}</span></a>
      <ul id="sub_01">
        <c:forEach items="${news.lowerMenus}" var="lowerMenus">
          <c:if test="${lowerMenus.haveRight}">
          <li><a href="<%=ctx%>${lowerMenus.url}"><span class="padding3">${lowerMenus.name}</span></a></li>
          </c:if>
        </c:forEach>
      </ul>
      </li>
    </c:forEach>
  </ul>
  <div class="clear"></div>
</div>